<template>
  <div class="sendInformation" :style="{minHeight:$store.state.minHeight+'rem'}">
    <myHead title="通知" background-color="#262A36"></myHead>
    <div class="tab">
      <div v-for="(x,y) in tab" class="tab_box" @click="isTab(y)">
        <p :class="present == y?'':'selected'">{{x.text}}</p>
        <transition name="el-zoom-in-center">
          <p v-show="present == y"></p>
        </transition>
      </div>
    </div>
    <div class="CommitBot">
      <div class="list" v-if="present == 0">
        <div class="left">
          <img src="../../../static/img/uhead.jpg" alt="">
        </div>
        <div class="right">
          <div class="right_content">
            伊泽瑞尔
          </div>
          <div class="right_top">
            <div>伊泽瑞尔</div>
            <div>13:05</div>
          </div>
        </div>
      </div>
      <div class="inform" v-else>
<!--        <div class="time">{{item.updatetime | formatDate}}</div>-->
<!--        <div class="content">-->
<!--          <div class="name">{{item.title}}</div>-->
<!--          <div class="desc">{{item.content}}</div>-->
<!--        </div>-->
        <div class="time">2028年01月15日 13:47</div>
        <div class="content">
          <div class="name">福利送达通知</div>
          <div class="desc">流沙包,您好,恭喜你成为包图网第100001个会员,我们将 赠送您一年的包图VIP会员,您可以享受任何素材的下载 希望您一直支持包图网！</div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
  import myHead from "../../components/SendComponents/lib/myHead";
  import {formatDate} from '../../methods/time'
  import Vue from 'vue';
  import { Icon } from 'vant';

  Vue.use(Icon);

  export default {
    name: "sendInformation",
    components:{
      myHead
    },
    filters: {
      formatDate(time) {
        time = time * 1000;
        let date = new Date(time);
        return formatDate(date, 'yyyy年MM月dd日 hh:mm')
      }
    },
    data() {
      return {
        tab: [
          {text: '消息通知'},
          {text: '系统消息通知'}
        ],
        present: 0,
      }
    },
    methods: {
      back() {
        this.$router.back();
      },
      isTab(index){
        this.present = index;
      },
    },
    mounted() {

    },
    watch: {

    }
  }
</script>

<style scoped>
  .sendInformation{
    padding-top: .48rem;
    box-sizing: border-box;
    background-color: #F5F5F5;
  }

  /* 费用分类部分 */
  .tab {
    width: calc(100% - .6rem);
    height: 100%;
    max-height: .45rem;
    padding: 0 .3rem;
    display: flex;
    flex-flow: row;
    justify-content: space-between;
    /*align-items: center;*/
    background-color: #ffffff;
  }

  .tab_box {
    height: 100%;
    width: 36%;
    max-height: .55rem;
    display: flex;
    flex-flow: column;
    justify-content: space-between;
    /*align-items: center;*/
    box-sizing: border-box;
    text-align: center;
  }

  .tab_box > p:nth-child(1) {
    color: #000000;
    font-size: .14rem;
    line-height: .14rem;
    padding: .15rem 0 .13rem;
    font-weight: bold;
  }

  .tab_box > p:nth-child(2) {
    width: 100%;
    height: .02rem;
    background-color: #FFD321;
    border-radius: .01rem;
  }

  .el-loading-spinner {
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    min-height: 5rem;
  }

  .selected {
    color: #333333 !important;
    font-size: .12rem !important;
    font-weight: normal !important;
  }

  .CommitBot{
    margin-top: .1rem;
  }
  .sendInformation .CommitBot .list{
    display: flex;
    justify-content: space-between;
    padding: .12rem .15rem;
    border-bottom: 1px solid #F0F0F0;
    background: #ffffff;
  }
  .sendInformation .CommitBot .list .left{
    width: .4rem;
    height: .4rem;
    border-radius: .2rem;
    overflow: hidden;
    margin-right: .1rem;
  }
  .sendInformation .list .right{
    font-size: .12rem;
    color: #999999;
    flex-grow: 1;
  }
  .sendInformation .list .right .right_top{
    display: flex;
    justify-content: space-between;
  }
  .sendInformation .list .right .right_content{
    color: #333333;
    font-size: .13rem;
    margin-bottom: .05rem;
  }
  .sendInformation .inform .time{
    width: 1.5rem;
    margin: 0 auto .1rem;
    height: .2rem;
    line-height: .2rem;
    background: #CCCCCC;
    text-align: center;
    color: #ffffff;
    font-size: .12rem;
    border-radius: .04rem;
  }
  .sendInformation .inform .content{
    background: #ffffff;
    padding: .15rem .2rem;
    border-radius: .04rem;
    margin: 0 .14rem;
  }
  .sendInformation .inform .content .name{
    color: #333333;
    font-size: .14rem;
  }
  .sendInformation .inform .content .desc{
    color: #666666;
    font-size: .12rem;
    margin-top: .06rem;
  }
</style>
